package com.mcxtzhang.indexlib.IndexBar.bean;

import com.mcxtzhang.indexlib.suspension.ISuspensionInterface;

/**
 * 介绍：索引类的标志位的实体基类
 * 作者：zhangxutong
 * 邮箱：mcxtzhang@163.com
 * CSDN：http://blog.csdn.net/zxt0601
 * 时间： 16/09/04.
 */

public abstract class BaseIndexBean implements ISuspensionInterface
{
    /**
     * 索引标签，可以自定义
     */
    protected String baseIndexTag;

    public String getBaseIndexTag()
    {
        return baseIndexTag;
    }

    public BaseIndexBean setBaseIndexTag(String baseIndexTag)
    {
        this.baseIndexTag = baseIndexTag;
        return this;
    }

    @Override
    public String getIndexTag()
    {
        if (null == baseIndexTag || "".equals(baseIndexTag.trim()))
            return "";

        return baseIndexTag.trim().substring(0, 1);
    }


}
